package pl.edu.pw.ee.buildcity.notifiers;

import pl.edu.pw.ee.buildcity.commons.exceptions.BuildCityRuntimeException;

/**
 * @author Mateusz
 * @since 2010-02-14
 */
public class CouldNotNotifyException extends BuildCityRuntimeException {

	private String recipient;

	public CouldNotNotifyException(String recipient, Throwable t) {
		super(t);
		this.recipient = recipient;
	}

	public String getRecipient() {
		return recipient;
	}

	@Override
	public String getMessage() {
		return "Could not send message to recipient '" + getRecipient() + "' due to exception: " + getCause().getMessage();
	}
}
